<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        function Fathher(uname,age,gender){
            this.uname = uname
            this.age = age
            this.gender = gender
        }

        Fathher.prototype.money = function(){
            console.log('赚了一个小目标');
        }
        function Son(uname,age,gender){
            Fathher.call(this,uname,age,gender)
        }
        Son.prototype.pay = function () {
            console.log('亏了一个小目标')
        }
        const father = new Father('j1', 3, 'man')
        const son = new Son('j2', 2, 'man')

        father.money()
        son.pay()
        son.money()
        console.log(father.pay);
    </script>
</body>
</html>